package Chapter01.Homework;
import java.util.Scanner;

public class Test01 {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        Company company=new  Company("傲视集团","纽约","*#*#1111111","奥利哈刚");
        company.show();
        while (true){
            System.out.println("1.输出员工信息 2 退出 3 新人入职 4 公司人数 5 辞退员工 6 薪水最高员工 7 找出年龄最大员工（工资加1000）");
            int chice=input.nextInt();
            if(chice==1) {
                company.Message();
            }else if(chice==2){
                    break;
            }else if(chice==3){
                System.out.println("请输入员工姓名");
                String name=input.next();
                System.out.println("请输入员工年龄：");
                int age=input.nextInt();
                System.out.println("请输入员工性别：");
                String gender=input.next();
                System.out.println("请输入员工职务：");
                String position=input.next();
                System.out.println("请输入员工薪水：");
                double salary=input.nextDouble();
                System.out.println("请输入员工工号：");
                String id=input.next();
                Employee employee=new Employee(name,age,gender,position,salary,id);
                company.add(employee);
            }else if(chice==4){
                company.people();
            }else if(chice==5){
                System.out.println("请输入员工工号：");
                String hao=input.next();
                boolean a=company.resign(hao);
                String num=a?"OK":"defeat";
                System.out.println(num);
            }else if(chice==6){
                System.out.println(company.max());
            }else if(chice==7){

            }
        }
        System.out.println("结束");
    }
}
